﻿// License Notification
//======================================================
// Copyright (c) 2010 Channel Intelligence Inc.
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// which accompanies this distribution, and is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// ======================================================




using System;
using System.Collections.Generic;
using CIP4.Common;
using MassTransit;

namespace CIP4.DataProvider.MassTransit
{
    [Serializable]
    public class RequestMessage :
        CorrelatedBy<Guid>
    {
        public enum OperationEnum
        {
            GetItems,
            SaveItems,
            PurgeItems,
            DeleteCollection,
        }

        public string CorrelationTag { get; set; }

        public string ExpectedType { get; set; }

        public OperationEnum Operation { get; set; }

        public string SelectionExpression { get; set; }

        public List<object> Values { get; set; }

        public Guid CorrelationId { get; set; }

        public override string ToString()
        {
            return string.Format("Operation={0}, tag={1}, type={2}, selectionExpression={3}", Operation, CorrelationTag, ExpectedType, SelectionExpression);
        }
    }
}
